<section class="d-flex flex-column row-gap-3">
    <button class="btn btn-outline-secondary" type="button" data-bs-toggle="collapse" data-bs-target="#tocContents" aria-expanded="false" aria-controls="tocContents">
        <svg class="bi fs-4 mx-4" aria-hidden="true"><use href="#bi-github"></use></svg>
        <svg class="bi fs-4" aria-hidden="true"><use href="#bi-chevron-expand"></use></svg>
        <span class="visually-hidden">info</span>
    </button>
    <div class="collapse" id="tocContents">
        <div class="d-flex flex-column justify-content-end card">
            <div class="card-body text-center">
                <ul class="list-group list-group-flush">
                    <li class="list-group-item">
                        <span>{{- T "footer_content_updated_time" -}}</span><time datetime="{{- .Page.Params.Date.Format "2006-01-02T15:04:05+08:00" | default "-" -}}"></time>
                    </li>
                    <li class="list-group-item">
                        {{ if hugo.IsProduction }}
                            <span>{{- T "footer_commit_time" -}}</span><time datetime="{{- .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML -}}"></time>
                        {{ else if hugo.IsDevelopment }}
                            <span>{{- T "footer_page_build_time" -}}</span><time datetime="{{- .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML -}}"></time>
                        {{ end }}
                    </li>
                </ul>
            </div>
            {{- $git := .Site.Params.Repo.git -}}
            {{- with .File -}}
            {{- $path := .Path | replaceRE `\\` "/" -}}
            <div class="card-body vstack gap-3">
                <a class="btn btn-outline-secondary"
                   href="{{- $git -}}/raw/main/site/content/{{- $path -}}"
                   title="{{ T "footer_raw_file_on_github" }}" target="_blank" rel="nofollow noopener">
                    <span class="mx-4">{{ T "footer_github_raw" }}</span>
                    <svg class="bi fs-4" aria-hidden="true"><title>{{ T "footer_github_raw" }}</title><use href="#bi-box-arrow-up-right"></use></svg>
                </a>
                <a class="btn btn-outline-secondary"
                   href="{{- $git -}}/blob/main/site/content/{{- $path -}}"
                   title="{{ T "footer_view_file_on_github" }}" target="_blank" rel="nofollow noopener">
                    <span class="mx-4">{{ T "footer_github_view" }}</span>
                    <svg class="bi fs-4" aria-hidden="true"><title>{{ T "footer_github_view" }}</title><use href="#bi-box-arrow-up-right"></use></svg>
                </a>
                <a class="btn btn-outline-secondary"
                   href="{{- $git -}}/edit/main/site/content/{{- $path -}}"
                   title="{{ T "footer_edit_file_on_github" }}" target="_blank" rel="nofollow noopener">
                    <span class="mx-4">{{ T "footer_github_edit" }}</span>
                    <svg class="bi fs-4" aria-hidden="true"><title>{{ T "footer_github_edit" }}</title><use href="#bi-box-arrow-up-right"></use></svg>
                </a>
            </div>
            {{- end -}}
        </div>
    </div>
</section>